<!--#include("./_header.html")-->

<!--%import("filter/update_purchase.xml")-->
<!--%import("js/shopxe.admin.js")-->
<form action="./" method="get" onsubmit="return procFilter(this, update_purchase)">
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="purchase_srl" value="{$purchase_info->get('purchase_srl')}" />
<input type="hidden" name="password" value="{$purchase_info->get('password')}" />
<input type="hidden" name="member_srl" value="{$purchase_info->get('member_srl')}" />

<h4 class="xeAdmin">{$lang->shopxe_cmd_order_list}</h4>
<table cellspacing="0" class="rowTable">
<thead>
    <tr>
        <th scope="col" class="half_wide"><div>{$lang->shopxe_list_head_product}</div></th>
        <th scope="col" class="half_wide"><div></div></th>
        <th scope="col" class="half_wide"><div>{$lang->shopxe_list_head_number}</div></th>
        <th scope="col" class="half_wide"><div>{$lang->shopxe_list_head_price}</div></th>
        <th scope="col" class="half_wide"><div>옵션</div></th>
        <th scope="col" class="half_wide"><div>{$lang->shopxe_list_head_tprice}</div></th>
        <th scope="col"><div>비고</div></th>
    </tr>
</thead>
<tbody>
    <!--@if( $purchase_items == null )-->
    <tr>
        <td colspan="7">{$lang->shopxe_nolist}</td>
    </tr>
    <!--@else-->

	<!--@foreach($purchase_items as $no => $val)-->
	{@$output_item = $val->get('item')}
    {@$output_options = explode(',',$val->get('options'))}
	{@$sel_options = null}
	{@$output_price = 0}
	<!--@foreach($output_item->options as $key1 => $val1)-->
		<!--@if( in_array( $val1->option_srl, $output_options ) )-->
			{@$sel_options[] = $val1}
			{@$output_price += $val1->option_price}
		<!--@end-->
	<!--@end-->
	{@$output_price += $val->get('volume')*$output_item->get('price_sale')}
	{@$output_volume = $val->get('volume')}
	<tr>
		<td>
			<!--@if($output_item->getThumbnail(70,40,'crop') == null)-->
				<img src="img/noimage.gif" width="70" height="40" />
			<!--@else-->
				<img src="{$output_item->getThumbnail(70,40,'crop')}" width="70" height="40" />
			<!--@end-->
			{$output_item->get('title')}
		</td>
		<td></td>
		<td>{number_format($output_volume)}</td>
		<td>{number_format($output_item->get('price_sale'))} {$lang->money_unit}</td>
		<td>
			{@$output_price = 0}
			<!--@foreach($sel_options as $key1 => $val1)-->
				선택옵션 : {$val1->option_name}<!--@if($val1->option_price)--> (+{$val1->option_price}원){@$output_price += $val1->option_price}<!--@end--> <br/>
			<!--@end-->
		</td>
		<td>{number_format($output_volume*($output_item->get('price_sale')+$output_price))} {$lang->money_unit}</td>
		<td></td>
	</tr>
	{@$total_price += $output_volume*($output_item->get('price_sale')+$output_price)}
	<!--@end-->

    <tr class="row{$cycle_idx}">
    	<td colspan="2"></td>
    	<td colspan="3">{$lang->shopxe_list_head_tprice}</td>
    	<td colspan="2">{number_format($total_price)} {$lang->money_unit}</td>
    </tr>
    <!--@end-->
</tbody>
</table>

<h4 class="xeAdmin">{$lang->shopxe_list_order_info}</h4>
<table cellspacing="0" class="rowTable">
    <tr>
        <th scope="row"><div>{$lang->shopxe_purchase_srl}</div></th>
        <td class="wide">{$purchase_info->get('purchase_srl')}</td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->shopxe_purchase_code}</div></th>
        <td class="wide">{$purchase_info->get('order_code')}</td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->o_user_name}</div></th>
        <td><input type="text" name="o_user_name" value="{$purchase_info->get('o_user_name')}" class="inputTypeText w200" /></td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->o_user_srl}</div></th>
        <td>{$purchase_info->get('member_srl')}</td>
    </tr>
    <tr>
        <th scope="row"><div>회원구분</div></th>
        <td>
        	<!--@if($purchase_info->get('member_srl')!=0)-->
				회원
			<!--@else-->
				비회원 (비밀번호:{$purchase_info->get('password')})
			<!--@end-->
        </td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->o_phone}</div></th>
        <td><input type="text" name="o_phone" value="{$purchase_info->get('o_phone')}" class="inputTypeText w200" /></td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->o_cellular}</div></th>
        <td><input type="text" name="o_cellular" value="{$purchase_info->get('o_cellular')}" class="inputTypeText w200" /></td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->o_mail_address}</div></th>
        <td>
			<input type="text" name="o_mail_id" value="{$purchase_info->get('o_mail_id')}" class="inputTypeText w100" />@
			<input type="text" name="o_mail_host" value="{$purchase_info->get('o_mail_host')}" class="inputTypeText w100" />
		</td>
    </tr>
</table>

<h4 class="xeAdmin">{$lang->shopxe_list_delivery_info}</h4>
<table cellspacing="0" class="rowTable">
    <tr>
        <th scope="row" class="w200"><div>{$lang->r_user_name}</div></th>
        <td><input type="text" name="r_user_name" value="{$purchase_info->get('r_user_name')}" class="inputTypeText w200" /></td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->r_phone}</div></th>
        <td><input type="text" name="r_phone" value="{$purchase_info->get('r_phone')}" class="inputTypeText w200" /></td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->r_cellular}</div></th>
        <td><input type="text" name="r_cellular" value="{$purchase_info->get('r_cellular')}" class="inputTypeText w200" /></td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->r_addr}</div></th>
        <td>
            <div><input type="text" name="r_addr" value="{$purchase_info->get('r_addr')}" class="inputTypeText w400" /></div>
            <div><input type="text" name="r_addr_1" value="{$purchase_info->get('r_addr_1')}" class="inputTypeText w400" /></div>
        </td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->shopxe_remark}</div></th>
        <td><textarea name="remark" class="inputTypeTextArea w400">{$purchase_info->get('remark')}</textarea></td>
    </tr>
</table>

<h4 class="xeAdmin">{$lang->shopxe_list_delivery_info}</h4>
<table cellspacing="0" class="rowTable">
    <tr>
        <th scope="row" class="w200"><div>{$lang->shopxe_delivery_company}</div></th>
        <td>
			<input type="text" name="transmit_info_business" value="{$purchase_info->get('transmit_info')->transmit_info_business}" class="inputTypeText w200" />
        </td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->shopxe_delivery_srl}</div></th>
        <td>
			<input type="text" name="transmit_info_number" value="{$purchase_info->get('transmit_info')->transmit_info_number}" class="inputTypeText w200" />
        </td>
    </tr>
</table>

<h4 class="xeAdmin">{$lang->shopxe_payment_info}</h4>
<table cellspacing="0" class="rowTable">
    <tr>
        <th scope="row" class="w200"><div>주문상태</div></th>
        <td>
        	<select name="step">
            <!--@foreach($paymentState as $key=>$val)-->
            	<option value="{$key}" <!--@if($key==$purchase_info->get('step'))-->selected="selected"<!--@end-->>{$val}</option>
            <!--@end-->
            </select>
			<p>
			<a href="{getUrl('order_srl',$purchase_info->get('purchase_srl'),'act','dispShopxeAdminPaymentManage')}">결제정보 바로가기</a>
			</p>
        </td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->selected_payment}</div></th>
        <td>
        	<select name="payment_call">
            <!--@foreach($paymentType as $key=>$val)-->
            	<option value="{$key}" <!--@if($key==$purchase_info->get('payment_call'))-->selected="selected"<!--@end-->>{$val}</option>
            <!--@end-->
            </select>
        </td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->shopxe_order_price}</div></th>
        <td><input type="hidden" name="order_amount" value="{$purchase_info->get('order_amount')}" />{number_format($purchase_info->get('order_amount'))} {$lang->money_unit}</td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->shopxe_discount_price}</div></th>
        <td><input type="text" name="discount_amount" value="{$purchase_info->get('discount_amount')}" class="inputTypeText w200" readonly /> {$lang->money_unit}</td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->shopxe_delivery_price}</div></th>
        <td>
			<input type="text" name="delivery_amount" value="{$purchase_info->get('delivery_amount')}" class="inputTypeText w200" readonly /> {$lang->money_unit}
		</td>
    </tr>
    <tr>
        <th scope="row" class="w200"><div>{$lang->shopxe_payment_price}</div></th>
        <td>
           	{number_format($purchase_info->get('payment_amount'))} {$lang->money_unit}
        </td>
    </tr>
</table>


<table cellspacing="0" class="rowTable">
<tr>
    <th colspan="2" class="button">
        <span class="button black strong"><input type="submit" value="{$lang->cmd_modify}" /></span>
        <span class="button"><input type="button" value="{$lang->cmd_back}" onclick="history.back(); return false;" /></span>
    </th>
</tr>
</table>


</form>

<!--#include("./_footer.html")-->